package cn.xh.org.service.impl;

import cn.xh.basic.service.impl.BaseServiceImpl;
import cn.xh.org.domain.Employee;
import cn.xh.org.mapper.EmployeeMapper;
import cn.xh.org.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
public class EmployeeServiceImpl extends BaseServiceImpl<Employee> implements IEmployeeService {
    /*
    * extends BaseServiceImpl<Employee>
    *     1.实现基础接口中的方法
    * */

    //2.实现扩展接口

    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public Employee loadByUsername(Employee admin) {
        return employeeMapper.loadByUsername(admin);
    }
}
